package com.cloud.service.impl;

import com.cloud.myInterface.Factory;
import com.cloud.pojo.UserInfo;
import com.cloud.service.UserManagerFeignService;
import com.cloud.tools.CommonResult;
import com.cloud.tools.CommonResultFactory;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @Author: Tangtao
 * @Date: 2022/5/2 21:47
 * @Description: Openfeign-based service fall back
 * @ClassName:  UserManagerFeignServiceImpl
 */
@Component
public class UserManagerFeignServiceImpl implements UserManagerFeignService {

    private final Factory resultFactory = new CommonResultFactory();

    @Override
    public CommonResult register(UserInfo userInfo) {
        return resultFactory.getResultInstance(500,"服务故障","fall back");
    }

    @Override
    public CommonResult loginByPhone(Map<String, String> map) {
        return resultFactory.getResultInstance(500,"服务故障","fall back");
    }

    @Override
    public CommonResult loginByCardId(Map<String, String> map) {
        return resultFactory.getResultInstance(500,"服务故障","fall back");
    }

    @Override
    public CommonResult updateInfo(Map<String, String> map) {
        return resultFactory.getResultInstance(500,"服务故障","fall back");
    }

    @Override
    public CommonResult getInfo() {
        return resultFactory.getResultInstance(500,"服务故障","fall back");
    }

    @Override
    public CommonResult updatePwd(Map<String, String> map) {
        return resultFactory.getResultInstance(500,"服务故障","fall back");
    }

    @Override
    public CommonResult getAllUserInfo() {
        return resultFactory.getResultInstance(500,"服务故障","fall back");
    }

    @Override
    public CommonResult deleteUserInfo(Map<String, String> map) {
        return resultFactory.getResultInstance(500,"服务故障","fall back");
    }

    @Override
    public CommonResult updateType(Map<String, String> map) {
        return resultFactory.getResultInstance(500,"服务故障","fall back");
    }

    @Override
    public CommonResult getLog() {
        return resultFactory.getResultInstance(500,"服务故障","fall back");
    }


}
